<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@page import="com.stx.crazyblog.entity.User" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="<%=request.getContextPath()%>/js/blog.js"></script><!--引入Js文件-->
<title>发表博文</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/blog.js"></script>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/blog.css"/>
</head>
<body>
<div>
		<fieldset>
			<%--从session中获取当前登录对象 --%>
			<%
				User currentUser = (User) session.getAttribute("currentUser");
			%>
			<legend>
				<%
					if (currentUser != null) {
				%>
				欢迎您，<%=currentUser.getUname()%>
				<a class="btn" href="<%=request.getContextPath()%>/jsp/loginout.jsp">退出</a>
				<%
					} else {
				%>
				请登录： <a class="btn"
					href="<%=request.getContextPath()%>/jsp/login.jsp">重新登录</a>
				<%
					}
				%>
			</legend>
			<div>
				<%
					if (currentUser != null) {
				%>
				<a href="<%=request.getContextPath()%>/jsp/index.jsp"></a>
				<%
					}
				%>
			</div>
		</fieldset>
</div>
 <form class="border_radius" id="focus" method="post" action="<%=request.getContextPath()%>/bloggerAdd">
        <center><h2>发表博文</h2></center>
        <label><span>请输入博文标题</span>
		<input type="text" name="bl_title" id="bl_title" class="input_txt border_radius"  /></label>
		<p>请输入正文<p>
		
        <textarea  id="bl_content" class="input_txt border_radius" name="bl_content" cols="45" rows="10"></textarea></label>
		 <br/>
		<p><input type="submit" value="发表" onClick="return checkData()"/></p>
			<input type="button" onclick="window.location.href='<%=request.getContextPath()%>/jsp/index.jsp'" value="返回">    	
    </form>
	</body>
</html>

